package com.gzc.just.play.last.war.common.message;

import io.netty.channel.ChannelHandlerContext;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
 * 简单消息处理器抽象类
 */
public abstract class SimpleMessageHandler<T> implements MessageHandler<T> {
    protected final Logger logger = LoggerFactory.getLogger(getClass());
    
    @Override
    public abstract void handle(T message, ChannelHandlerContext ctx);
    
    @Override
    public abstract int getMessageId();
    
    @Override
    public String getName() {
        return getClass().getSimpleName();
    }
    
    @Override
    public Logger getLogger() {
        return logger;
    }
}